package com.homework;

import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;

public class Test02 {
    public static void main(String[] args) {
        HashSet<String> objects = new HashSet<>();
        Collections.addAll(objects,"张三","lisi","wangwu","wangwu1","zhangshan");
        Iterator<String> iterator = objects.iterator();
        while (iterator.hasNext()){
            String next = iterator.next();
            System.out.println(next);
        }
    }
}
